export interface MinutesStore {
  asrStore: AsrStore;
  searchIndexModel: SearchIndexModel;
  conferenceId: string;
  shareId: string;
  enableAsrOptimize: boolean;
  errorMsg: string;
  needPassword: boolean;
  needLogin: boolean;
  recordIndex: number;
  asrList: AsrObject[];
  aiAsrList: AsrObject[];
  recordInfo: RecordInfo;
  // eslint-disable-next-line no-unused-vars
  getUserName(ui: string): string;
}

export interface AsrStore {
  // asr文字总字数
  asrCharCount: number;
  // asr是否完成
  asrCompleted: boolean;
  // asr识别结果
  asrRecognition: AsrRecognition;
  // asr任务id
  asrTaskId: string;
  // asr更新内容
  asrUpdatedContent: AsrUpdatedContent;
  // 会议开始时间
  confStartTime: Date;
  // 客户名称
  customerName: string;
  // 客户职位
  customerPosition: Array<string>;
  // 客户角色
  customerRole: Array<string>;
  // 是否包含asr
  hasAsr: boolean;
  // 是否包含扩展
  hasExt: boolean;
  // 是否包含总结
  hasSummary: boolean;
  // 是否包含更新asr内容
  hasUpdatedAsrContent: boolean;
  // 主持人sso用户id
  hostSsoUserId: string;
  // 主持人用户id
  hostUserId: string;
  // 内部合作伙伴职位
  internalPartnerPositions: Array<string>;
  // 是否已阅
  managerViewed: boolean;
  // 会议类别
  meetingCate: string;
  // 会议类型 0:音视频会议 1:音频会议 2:P2P(巡店) 3:固定会议室 4:智能教练 5:网络研讨会 6:人才发展 7:销售助理 8:面试助手
  // (ps: 此处 固定-7 -> MeetType_SalesAssistantConference)
  meetingType: number;
  // 是否需要计算实时
  needCalRealTime: boolean;
  // 识别内容
  recognitionContent: string;
  // 识别状态
  recognitionStatus: string;
  // 会议记录信息
  recordInfo: RecordInfo;
  // 会议记录权限
  recordViewPermission: number;
  // 销售目标
  salesGoal: string;
  // 销售商品类别
  salesGoodsCategories?: any;
  // 销售人员类型
  salesMateType: number;
  // 销售相关类型
  salesRelatedType: number;
  // 标签
  tags: string;
  // 更新asr内容
  updatedAsrContent: string;
  // 是否为上传会议
  uploadedRecord: boolean;
  // 销售提升课程id
  salesPromoteCourseId: string;
}

export interface AsrRecognition {
  ActionLabResults: Array<ActionLabResult>;
  AsrParagraphsList: Array<AsrParagraphs>;
  Classifications: Classifications;
  ConversationalSummary: Array<ConversationalSummary>;
  KeySentenceLabResults: Array<KeySentenceLabResult>;
  KeywordLabResults: Array<KeywordLabResult>;
  MindMapSummary: Array<MindMapSummary>;
  ParagraphSummary: string;
  QuestionsAnsweringSummary: Array<QuestionsAnsweringSummary>;
  TopicLabResults: Array<TopicLabResult>;
  UidInfo: UidInfoMap;
  version: string;
}

export interface UidInfo {
  name: string;
  age: number;
}

export interface UidInfoMap {
  [key: string]: UidInfo;
}

export interface AsrUpdatedContent {
  CustomerRoles: Array<CustomerRoles>;
  InternalPartners?: Array<InternalPartner>;
  Interviewers?: Array<any>;
  KeySentenceLabResult?: Array<any>;
  ParticipantResult: Array<ParticipantResult>;
  RecognitionResult?: Array<any>;
  SubtitleResult?: Array<any>;
  Todos?: Array<any>;
  TopicLabResult?: Array<any>;
  changes?: any;
}

export interface RecordInfo {
  hostUserId: string;
  orgId: string;
  recordList: Array<RecordDetailInfo>;
  showAsrLogo: boolean;
  startTime: string;
  subject: string;
  totalNum: number;
}

export interface ActionLabResult {
  bt: number;
  et: number;
  pd: number;
  value: string;
}

export interface AsrParagraphs {
  AsrList: Array<AsrObject>;
  TextPolish: string;
  ui: string;
  // -------客户端自定义-------
  name: string;
  txt: string;
  bt: number;
  startTime: string;
  startTimeByFile: string;
}

export interface Classifications {
  Interview: number;
  Lecture: number;
  Meeting: number;
}

export interface ConversationalSummary {
  Summary: string;
  ui: string;
  // 客户端自定义
  name: string;
}

export interface KeySentenceLabResult {
  bt: number;
  et: number;
  pd: number;
  value: string;
}

export interface KeywordLabResult {
  id: number;
  value: string;
}

export interface MindMapSummary {
  Title: string;
  Topic: Array<Topic>;
}

export interface QuestionsAnsweringSummary {
  Answer: string;
  Question: string;
  SentenceIdsOfAnswer: Array<number>;
  SentenceIdsOfQuestion: Array<number>;
  UsersOfAnswer: Array<string>;
  UsersOfQuestion: Array<string>;
}

export interface TopicLabResult {
  bt: number;
  et: number;
  id: number;
  pd: number;
  summary: string;
  value: string;
  //客户端自定义字段
  beganTime: string;
}

export interface CustomerRoles {
  formData: FormData;
  formDataId: string;
  id: string;
  name: string;
  position: string;
  role: string;
  title: string;
  ui: string;
}

export interface InternalPartner {
  formData: FormData;
  name: string;
  ui: string;
  position?: string;
}

export interface ParticipantResult {
  id: string;
  value: string;
}

export interface RecordDetailInfo {
  asr: boolean;
  asrTranslateStatus: number;
  customerName: string;
  duration: number;
  firstInterview: boolean;
  format: string;
  hasAsr: boolean;
  host: boolean;
  hostName: string;
  id: string;
  interviewId?: any;
  interviewName?: any;
  interviewPositionId: string;
  interviewPositionName?: any;
  interviewRound: number;
  managerViewed: boolean;
  meetingKey: string;
  meetingType: number;
  name: string;
  needCalRealTime: boolean;
  recordingPath: string;
  reportStatus: string;
  salesGoal: string;
  salesGoodsCategories?: any;
  salesMateType: number;
  salesRelatedType: number;
  salesSyncStatus: string;
  scdetOffsets?: Array<any>;
  shareRecords?: Array<any>;
  size: string;
  startTime: Date;
  status: number;
  tags: string;
  uploadedRecord: boolean;
}

export interface AsrObject {
  bt: number; // 字幕开始时间
  et: number; // 字幕结束时间
  osi: number; // 字幕序号
  pt: number; // 字幕暂停
  si: number; // 字幕序号
  txt: string; // 字幕内容
  // -------客户端自定义-------
  name: string; // 发言人姓名
  ui: string;
  duration: number; //字幕持续时间;
  startTime: string; // 字幕开始时间
  startTimeByFile: string; // 字幕开始时间(文件)
}

export interface Topic {
  Title: string;
  Topic?: Array<Topic | any>;
}

export interface User1 {
  name: string;
  uuid: string;
}

export interface User0 {
  name: string;
  uuid: string;
}

export interface FormData {
  checkSuccess: boolean;
  fieldValues: Array<FieldValues>;
  formDataId: string;
}

export interface FieldValues {
  fieldId: string;
  fieldName: string;
  fieldValue: string;
  id: string;
}

export interface SearchIndexModel {
  indexOfItem: number;
  indexOfLine: number;
  type: String;
  item: Object;
}

export enum SpeechOverviewType {
  CUSTOMER_ROLE = "CUSTOMER_ROLE", // 客户角色
  INTERNAL_PARTNER = "INTERNAL_PARTNER", // 内部合作伙伴
  UNKNOWN = "UNKNOWN" // 未知
}

// 客户端自定义类型
export interface SpeechOverview {
  name: string; // 姓名
  uid: string; // id
  asrList: Array<AsrObject>; // 字幕列表
  percent: number; // 发言总占比
  formData: FormData | null; // 表单数据
  total: number;
  position?: string;
  type: SpeechOverviewType; // 类型
}
